<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .father {
      width: 500px;
      height: 300px;
      margin: 100px auto;
      border: 1px solid #000;
    }

    .son {
      width: 200px;
      height: 100px;
      background-color: pink;
      transition: all 1s;
    }

    .father:hover .son {
      transform: translate(200px, 100px);

      /* 百分比：参照盒子自身尺寸计算结果 （这里的 50% 不用加引号） */
      transform: translate(50%, 100%);
      transform: translate(-50%, 100%);

      /* translate 中如果只写一个值，默认水平移动 */
      transform: translate(200px);
    }
  </style>
</head>

<body>
  <div class="father">
    <div class="son"></div>
  </div>
</body>

</html>